package algorithmTopics.designPatterns.singletonPattern;

/**
 * 懒惰单例
 *
 * @author 86155
 * @date 2025/07/20
 */
public class LazySingleton {
    private LazySingleton(){};

    private static class SingletonHolder{
        //静态内部类 进行懒加载
        private static final LazySingleton LAZY_SINGLETON = new LazySingleton();
    }

    public static final LazySingleton getInstance() {
        return SingletonHolder.LAZY_SINGLETON;
    }
}
